<?php
	$qishu = $_GET['qishu'];
	$sql="select * from {$this->prename}orderssc where qishu=".$qishu." order by id desc";
	$order=$this->getPage($sql, $this->page, $this->pageSize);
	foreach ($order['data'] as $key => $val) {
		$order['data'][$key]['username'] = $this->getValue("select username from {$this->prename}members where uid=".$val['uid']."");
		$order['data'][$key]['kjhaoma'] = $this->getRow("select * from {$this->prename}datassc where qishu=".$val['qishu']."");
	}
?>
<article class="module width_full">
<input type="hidden" value="<?=$this->user['username']?>" />
	<header>
		<h3 class="tabs_involved"><?=$typeInfo['title']?>开奖数据
		<!-- <form class="submit_link wz" action="/admin778899.php/data/index/<?=$this->type?>" target="ajax" call="defaultSearch" dataType="html">
			期数：<input name="qishu" type="text"  />
			<label>日期：<input name="date" type="date" /></label>
			<input type="submit" value="查找" class="alt_btn">
			<input type="reset" value="重置条件">
		</form> -->
		</h3>
	</header>

	<table class="tablesorter" cellspacing="0">
		<thead>
			<tr>
				<th>彩种</th>
				<th>用户</th>
				<th>期数</th>
				<th>金额</th>
				<th>订单时间</th>
				<th>开奖数据</th>
				<th>状态</th>
				<th>中奖金额</th>
				<th>开奖时间</th>
			</tr>
		</thead>
		<tbody>
			<?php foreach($order['data'] as $var){ ?>
			<tr>
				<td>阿里分分彩</td>
				<td><?=$var['username']?></td>
				<td><?=$var['qishu']?></td>
				<td><?=$var['money']?></td>
				<td><?=date('Y-m-d H:i:s',$var['ordertime'])?></td>
				<td><?=$var['kjhaoma']['ball1'].$var['kjhaoma']['ball2'].$var['kjhaoma']['ball3'].$var['kjhaoma']['ball4'].$var['kjhaoma']['ball5']?></td>
				<td><?php if($var['kai'] == 1){ ?>已中奖<?php }else{ ?>未中奖<?php } ?></td>
				<td><?=$var['winmoney']?></td>
				<td><?php if($var['wintime'] != 0){ ?> <?=date('Y-m-d H:i:s',$var['wintime'])?> <?php } ?></td>
				
			</tr>
			<?php } ?>
            

		</tbody>
	</table>
	<footer>
	<?php
		//$rel=$args[0]['id'];
		if($para){
			$rel.='?'.http_build_query($para,'','&');
		}
		$rel=$this->controller.'/'.$this->action .'-{page}/'.$this->type.'?'.http_build_query($_GET,'','&');
		$this->display('inc/page.php', 0, $times['total'], $rel, 'dataPageAction');
	?>
	</footer>
</article>